/*** 
 * @_______________#########_______________________ 
 * @______________############_____________________ 
 * @______________#############____________________ 
 * @_____________##__###########___________________ 
 * @____________###__######_#####__________________ 
 * @____________###_#######___####_________________ 
 * @___________###__##########_####________________ 
 * @__________####__###########_####_______________ 
 * @________#####___###########__#####_____________ 
 * @_______######___###_########___#####___________ 
 * @_______#####___###___########___######_________ 
 * @______######___###__###########___######_______ 
 * @_____######___####_##############__######______ 
 * @____#######__#####################_#######_____ 
 * @____#######__##############################____ 
 * @___#######__######_#################_#######___ 
 * @___#######__######_######_#########___######___ 
 * @___#######____##__######___######_____######___ 
 * @___#######________######____#####_____#####____ 
 * @____######________#####_____#####_____####_____ 
 * @_____#####________####______#####_____###______ 
 * @______#####______;###________###______#________ 
 * @________##_______####________####______________ 
 * @
 * @Author: ipk518 18163976442@163.com
 * @Date: 2024-09-02 17:03:26
 * @LastEditors: ipk518 18163976442@163.com
 * @LastEditTime: 2024-12-10 14:44:54
 * @FilePath: /etws-sxk2307/inc/qsfp_12x.h
 * @Description: 
 * @************佛祖保佑************
 * @Copyright (c) 2024 by etws@quyujiang, All Rights Reserved. 
 */

/* QSFP support common definitions, for ib_qib driver */
#ifndef __QSFP_4x_h_


#include "stdio.h"
#include "stdint.h"

//1001 000X = 0x48
#define QSFP_TX_DEV 0x50
//1010 100x = 0x54
#define QSFP_RX_DEV 0x54

#define QSFP_PWR_LAG_MSEC 2000
#define QSFP_MODPRS_LAG_MSEC 20



typedef union
{
    uint8_t status1;
    struct
    {
        uint8_t  ch8_los:1;//锁存的TX los标志，通道8
        uint8_t  ch9_los:1;//锁存的ch los标志，通道9
        uint8_t  ch10_los:1;//锁存的ch los标志，通道10
        uint8_t  ch11_los:1;//encodes for channel ch11
        uint8_t  reserve:4;
            
    }byte7;
}qsfp_12x_status1;

typedef union
{
    uint8_t status2;
    struct
    {
        uint8_t  ch0_los:1;//锁存的ch los标志，通道0
        uint8_t  ch1_los:1;//锁存的ch los标志，通道1
        uint8_t  ch2_los:1;//锁存的ch los标志，通道2
        uint8_t  ch3_los:1;//锁存的ch los标志，通道3
        uint8_t  ch4_los:1;//锁存的ch los标志，通道4
        uint8_t  ch5_los:1;//锁存的ch los标志，通道5
        uint8_t  ch6_los:1;//锁存的ch los标志，通道6
        uint8_t  ch7_los:1;//锁存的ch los标志，通道7
            
    }byte8;
}qsfp_12x_status2;

//lox tx Loss of Signal Tx Channel: Coded 1 when asserted, Latched, Clears on Read.
struct qsfp_12x_txlos
{
    qsfp_12x_status1 m_losHigh;
    qsfp_12x_status2 m_losLow;
};


typedef union
{
    uint8_t chFault1;
    struct
    {
        uint8_t  ch8_fault:1;//Fault ch8 Channel
        uint8_t  ch9_fault:1;
        uint8_t  ch10_fault:1;
        uint8_t  ch11_fault:1;
        uint8_t  reserve:4;
            
    }byte9;
}qsfp_12x_status3;

typedef union
{
    uint8_t chFault2;
    struct
    {
        uint8_t  ch0_fault:1;//Fault ch0 Channel
        uint8_t  ch1_fault:1;
        uint8_t  ch2_fault:1;
        uint8_t  ch3_fault:1;
        uint8_t  ch4_fault:1;//Fault ch8 Channel
        uint8_t  ch5_fault:1;
        uint8_t  ch6_fault:1;
        uint8_t  ch7_fault:1;
            
    }byte10;
}qsfp_12x_status4;

//Fault ch Channel: Coded 1 when asserted, Latched, Clears on Read
struct __attribute__ ((__packed__)) qsfp_12x_fault
{
    qsfp_12x_status3 m_faultHigh;
    qsfp_12x_status4 m_faultLow;
};


typedef union
{
    uint8_t txBias;
    struct
    {
        uint8_t tx8_lTxBiasAlarm:1;//Coded 01b when Low Bias current alarm is asserted
        uint8_t tx8_hTxBiasAlarm:1;//Coded 10b when High Bias current alarm is asserted
        uint8_t tx9_lTxBiasAlarm:1;
        uint8_t tx9_hTxBiasAlarm:1;
        uint8_t tx10_lTxBiasAlarm:1;
        uint8_t tx10_hTxBiasAlarm:1;
        uint8_t tx11_lTxBiasAlarm:1;
        uint8_t tx11_hTxBiasAlarm:1;
    }byte11;
}txBias1;

typedef union
{
    uint8_t txBias;
    struct
    {
        uint8_t tx4_lTxBiasAlarm:1;
        uint8_t tx4_hTxBiasAlarm:1;
        uint8_t tx5_lTxBiasAlarm:1;
        uint8_t tx5_hTxBiasAlarm:1;
        uint8_t tx6_lTxBiasAlarm:1;
        uint8_t tx6_hTxBiasAlarm:1;
        uint8_t tx7_lTxBiasAlarm:1;
        uint8_t tx7_hTxBiasAlarm:1;
    }byte12;
}txBias2;

typedef union
{
    uint8_t txBias;
    struct
    {
        uint8_t tx0_lTxBiasAlarm:1;
        uint8_t tx0_hTxBiasAlarm:1;
        uint8_t tx1_lTxBiasAlarm:1;
        uint8_t tx1_hTxBiasAlarm:1;
        uint8_t tx2_lTxBiasAlarm:1;
        uint8_t tx2_hTxBiasAlarm:1;
        uint8_t tx3_lTxBiasAlarm:1;
        uint8_t tx3_hTxBiasAlarm:1;
    }byte13;
}txBias3;

//ch Optical Bias Hi-Lo Alarm Latched: 2 bits / channel
struct __attribute__ ((__packed__)) qsfp_12x_bias
{
    
};

typedef union
{
    uint8_t chPower;
    struct
    {
        uint8_t ch8_lchPwdAlarm:1;//Coded 01b when Low Bias current alarm is asserted
        uint8_t ch8_hchPwdAlarm:1;//Coded 10b when High Bias current alarm is asserted
        uint8_t ch9_lchPwdAlarm:1;////锁存功率过低报警
        uint8_t ch9_hchPwdAlarm:1;
        uint8_t ch10_lchPwdAlarm:1;
        uint8_t ch10_hchPwdAlarm:1;
        uint8_t ch11_lchPwdAlarm:1;
        uint8_t ch11_hchPwdAlarm:1;
    }byte14;
}chPower1;

typedef union
{
    uint8_t chPower;
    struct
    {
        uint8_t ch4_lchPwdAlarm:1;
        uint8_t ch4_hchPwdAlarm:1;
        uint8_t ch5_lchPwdAlarm:1;
        uint8_t ch5_hchPwdAlarm:1;
        uint8_t ch6_lchPwdAlarm:1;
        uint8_t ch6_hchPwdAlarm:1;
        uint8_t ch7_lchPwdAlarm:1;
        uint8_t ch8_hchPwdAlarm:1;
    }byte15;
}chPower2;

typedef union
{
    uint8_t chBias;
    struct
    {
        uint8_t ch0_lchPwdAlarm:1;
        uint8_t ch0_hchPwdAlarm:1;
        uint8_t ch1_lchPwdAlarm:1;
        uint8_t ch1_hchPwdAlarm:1;
        uint8_t ch2_lchPwdAlarm:1;
        uint8_t ch2_hchPwdAlarm:1;
        uint8_t ch3_lchPwdAlarm:1;
        uint8_t ch3_hchPwdAlarm:1;
    }byte16;
}chPower3;

//Tx Optical Power Hi-Lo Alarm Latched, 2 bits per channel
struct __attribute__ ((__packed__)) qsfp_12x_power
{
    chPower1 m_chPowerHigh;
    chPower2 m_chPowerMsi;
    chPower3 m_chPowerLow;
};


typedef union
{
    uint8_t chPower;
    struct
    {
        uint8_t ch8_lchPwdMask:1;//Mask ch Optical Power Hi-Lo Alarm:
        uint8_t ch8_hchPwdMask:1;//Mask ch Optical Power Hi-Lo Alarm:
        uint8_t ch9_lchPwdMask:1;////锁存功率过低报警
        uint8_t ch9_hchPwdMask:1;
        uint8_t ch10_lchPwdMask:1;
        uint8_t ch10_hchPwdMask:1;
        uint8_t ch11_lchPwdMask:1;
        uint8_t ch11_hchPwdMask:1;
    }byte102;
}chPowerMask1;

typedef union
{
    uint8_t chPower;
    struct
    {
        uint8_t ch4_lchPwdMask:1;
        uint8_t ch4_hchPwdMask:1;
        uint8_t ch5_lchPwdMask:1;
        uint8_t ch5_hchPwdMask:1;
        uint8_t ch6_lchPwdMask:1;
        uint8_t ch6_hchPwdMask:1;
        uint8_t ch7_lchPwdMask:1;
        uint8_t ch8_hchPwdMask:1;
    }byte103;
}chPowerMask2;

typedef union
{
    uint8_t chBias;
    struct
    {
        uint8_t ch0_lchPwdMask:1;
        uint8_t ch0_hchPwdMask:1;
        uint8_t ch1_lchPwdMask:1;
        uint8_t ch1_hchPwdMask:1;
        uint8_t ch2_lchPwdMask:1;
        uint8_t ch2_hchPwdMask:1;
        uint8_t ch3_lchPwdMask:1;
        uint8_t ch3_hchPwdMask:1;
    }byte104;
}chPowerMask3;

typedef union
{
    uint8_t txBiasMask1;
    struct
    {
        uint8_t tx8_lTxBiasMask:1;//Mask Tx Bias Current Hi-Lo Alarm
        uint8_t tx8_hTxBiasMask:1;//Mask Tx Bias Current Hi-Lo Alarm
        uint8_t tx9_lTxBiasMask:1;
        uint8_t tx9_hTxBiasMask:1;
        uint8_t tx10_lTxBiasMask:1;
        uint8_t tx10_hTxBiasMask:1;
        uint8_t tx11_lTxBiasMask:1;
        uint8_t tx11_hTxBiasMask:1;
    }byte99;
}txBiasMask1;

typedef union
{
    uint8_t txBiasMask2;
    struct
    {
        uint8_t tx4_lTxBiasMask:1;//Mask Tx Bias Current Hi-Lo Alarm:
        uint8_t tx4_hTxBiasMask:1;
        uint8_t tx5_lTxBiasMask:1;
        uint8_t tx5_hTxBiasMask:1;
        uint8_t tx6_lTxBiasMask:1;
        uint8_t tx6_hTxBiasMask:1;
        uint8_t tx7_lTxBiasMask:1;
        uint8_t tx7_hTxBiasMask:1;
    }byte100;
}txBiasMask2;

typedef union
{
    uint8_t txBiasMask3;
    struct
    {
        uint8_t tx0_lTxBiasMask:1;//Mask Tx Bias Current Hi-Lo Alarm:
        uint8_t tx0_hTxBiasMask:1;
        uint8_t tx1_lTxBiasMask:1;
        uint8_t tx1_hTxBiasMask:1;
        uint8_t tx2_lTxBiasMask:1;
        uint8_t tx2_hTxBiasMask:1;
        uint8_t tx3_lTxBiasMask:1;
        uint8_t tx3_hTxBiasMask:1;
    }byte101;
}txBiasMask3;


typedef union
{
    uint8_t tempAlarm;
    struct
    {
        uint8_t  reserve:6;//预留
        uint8_t  lTxTempAlarm:1;//锁存低温报警
        uint8_t  hTxTempAlarm:1;//锁存高温报警
            
    }byte17;
    
}qsfp_12x_monitorTamp;

typedef union
{
    uint8_t voltAlarm;
    struct
    {
        uint8_t  reserve:6;//预留
        uint8_t  lTxVoltAlarm:1;//锁存低电源电压报警
        uint8_t  hTxVoltAlarm:1;//锁存高电源电压报警
            
    }byte18;
}qsfp_12x_monitorVolt;


typedef union
{
    uint8_t chDisable;
    struct 
    {
        uint8_t  ch8_disable:1;//允许软件禁用发射机的读写位
        uint8_t  ch9_disable:1;//Read/write bit that allows software disable of transmitters
        uint8_t  ch10_disable:1;
        uint8_t  ch11_disable:1;
        uint8_t  reserve:4;
    }byte52;
}qsfp_12x_chDisable1;

typedef union
{
    uint8_t chDisable;
    struct 
    {
        uint8_t  ch0_disable:1;//允许软件禁用发射机的读写位
        uint8_t  ch1_disable:1;//Read/write bit that allows software disable of transmitters
        uint8_t  ch2_disable:1;
        uint8_t  ch3_disable:1;
        uint8_t  ch4_disable:1;//允许软件禁用发射机的读写位
        uint8_t  ch5_disable:1;//Read/write bit that allows software disable of transmitters
        uint8_t  ch6_disable:1;
        uint8_t  ch7_disable:1;
    }byte53;
}qsfp_12x_chDisable2;

//reg 52-94 rw Control Bytes
struct qsfp_12x_control
{
    
};
typedef union
{
    uint8_t mrxlos;
    struct 
    {
        uint8_t  mRx8Los:1;//Masking bit for RX LOS indicator, channel 1
        uint8_t  mRx9Los:1;
        uint8_t  mRx10Los:1;
        uint8_t  mRx11Los:1;
        uint8_t  reserve:4;
    }byte95;
}qsfp_12x_mlos1;


typedef union
{
    uint8_t mrxlos;
    struct 
    {
        uint8_t  mRx0Los:1;//Masking bit for RX LOS indicator, channel 1
        uint8_t  mRx1Los:1;
        uint8_t  mRx2Los:1;
        uint8_t  mRx3Los:1;
        uint8_t  mRx4Los:1;//Masking bit for RX LOS indicator, channel 1
        uint8_t  mRx5Los:1;
        uint8_t  mRx6Los:1;
        uint8_t  mRx7Los:1;
    }byte96;
}qsfp_12x_mlos2;

typedef union
{
    uint8_t mchfault;
    struct 
    {
        uint8_t  mch8Fault:1;//Masking bit for ch fault indicator, channel 1
        uint8_t  mch9Fault:1;
        uint8_t  mch10Fault:1;
        uint8_t  mch11Fault:1;
        uint8_t  reserve:4;
    }byte97;
}qsfp_12x_mfault1;

typedef union
{
    uint8_t mchfault;
    struct 
    {
        uint8_t  mch0Fault:1;//Masking bit for ch fault indicator, channel 1
        uint8_t  mch1Fault:1;
        uint8_t  mch2Fault:1;
        uint8_t  mch3Fault:1;
        uint8_t  mch4Fault:1;//Masking bit for ch fault indicator, channel 1
        uint8_t  mch5Fault:1;
        uint8_t  mch6Fault:1;
        uint8_t  mch7Fault:1;
    }byte98;
}qsfp_12x_mfault2;

typedef union
{
    uint8_t temp;
    struct 
    {
        uint8_t  reserve:6;
        uint8_t  lTempAlarmMask:1;
        uint8_t  hTempAlarmMask:1;
    }byte105;
}qsfp_12x_tempMask;

typedef union
{
    uint8_t mvcc;
    struct 
    {
        uint8_t  reserve:6;
        uint8_t  mlVccAlarm:1;
        uint8_t  mhVccAlarm:1;
    }byte106;
}qsfp_12x_vccMask;

//reg 95~126 RW Module and Channel Masks
struct qsfp_12x_channelMask
{
    
};



//武汉钧恒科技有限公司 10.3125G，850nm 12 收 12 发并行光收发模块 TLZ850M10GC#200
/**********************Lower Memory Map of the QSFP+ module.***************************/
/*Byte Address  Description                 Type
*0-6            Reserved  (7 Byte)          Read Only
*7-18           Alarms(12 Bytes)            Read Only
*24-31          Monitors temp vc(8 Bytes)   Read Only
*40-41          Module Monitors(12Bytes)    Read Only
*42-69          Control(28 Bytes)           Read/Write
*97-108         Masks (12 Bytes)            Read/Write
*/
/***************************************************************************************/
struct __attribute__ ((__packed__)) qsfp_12x_Txcache
{
    uint8_t m_reserved[7];
    qsfp_12x_status1 m_losHigh;
    qsfp_12x_status2 m_losLow;
    qsfp_12x_status3 m_faultHigh;
    qsfp_12x_status4 m_faultLow;
    txBias1 m_txBiasHigh;
    txBias2 m_txBiasMid;
    txBias3 m_txBiasLow;
    chPower1 m_chPowerHigh;
    chPower2 m_chPowerMid;
    chPower3 m_chPowerLow;
    qsfp_12x_monitorTamp m_monitorTamp;
    qsfp_12x_monitorVolt m_monitorVolt;
    uint8_t m_byte19_21[3];
    uint8_t m_tamp[2];
    uint8_t m_byte24_25[2];
    uint8_t m_vcc[2];
    uint8_t m_byte28_51[24];
    qsfp_12x_chDisable1 m_byte52;
    qsfp_12x_chDisable2 m_byte53;
    uint8_t m_byte54_94[41];
    qsfp_12x_mlos1 m_byte95;//95-126
    qsfp_12x_mlos2 m_byte96;
    qsfp_12x_mfault1 m_byte97;
    qsfp_12x_mfault2 m_byte98;
    txBiasMask1 m_txBiasMaskHigh;
    txBiasMask2 m_txBiasMaskMid;
    txBiasMask3 m_txBiasMaskLow;
    chPowerMask1 m_maskPowerHigh;
    chPowerMask2 m_maskPowerMid;
    chPowerMask3 m_maskPowerLow;
    qsfp_12x_tempMask m_tempMask;
    qsfp_12x_vccMask m_vccMask;
    uint8_t m_byte107_126[20];
    uint8_t m_pageSelect;               //Selects Upper Page - Required if paging is used on upper page(s). Not required if paging is not used. Writing 00h selects Tx & Rx Upper Page 00h Writing 01h selects Tx Upper Page 01h, etc.
};

struct __attribute__ ((__packed__)) qsfp_12x_Rxcache
{
    uint8_t m_reserved[7];
    qsfp_12x_status1 m_losHigh;
    qsfp_12x_status2 m_losLow;
    qsfp_12x_status3 m_faultHigh;
    qsfp_12x_status4 m_faultLow;
    uint8_t m_byte11_13[3];
    chPower1 m_chPowerHigh;
    chPower2 m_chPowerMid;
    chPower3 m_chPowerLow;
    qsfp_12x_monitorTamp m_monitorTamp;
    qsfp_12x_monitorVolt m_monitorVolt;
    uint8_t m_byte19_21[3];
    uint8_t m_tamp[2];
    uint8_t m_byte24_25[2];
    uint8_t m_vcc[2];
    uint8_t m_byte28_51[24];
    qsfp_12x_chDisable1 m_byte52;
    qsfp_12x_chDisable2 m_byte53;
    uint8_t m_byte54_94[41];
    qsfp_12x_mlos1 m_byte95;//95-126
    qsfp_12x_mlos2 m_byte96;
    qsfp_12x_mfault1 m_byte97;
    qsfp_12x_mfault2 m_byte98;
    txBiasMask1 m_txBiasMaskHigh;
    txBiasMask2 m_txBiasMaskMid;
    txBiasMask3 m_txBiasMaskLow;
    chPowerMask1 m_maskPowerHigh;
    chPowerMask2 m_maskPowerMid;
    chPowerMask3 m_maskPowerLow;
    qsfp_12x_tempMask m_tempMask;
    qsfp_12x_vccMask m_vccMask;
    uint8_t m_byte107_126[20];
    uint8_t m_pageSelect;               //Selects Upper Page - Required if paging is used on upper page(s). Not required if paging is not used. Writing 00h selects Tx & Rx Upper Page 00h Writing 01h selects Tx Upper Page 01h, etc.
};

/*
*00h Not implemented for user. 
*01h default
*/
//reg 128-255
struct __attribute__ ((__packed__)) upperMemoryTx1
{
    uint8_t m_tempThresholdMsb;                 //Hi Alarm Threshold for 1st Internal Temperature Monitor for Tx MSB: Integer part coded in signed 2’s complement. Tolerance is ± 3°C.
    uint8_t m_tempThresholdLsb;                 //Hi Alarm Threshold for 1st Internal Temperature Monitor for Tx LSB: Fractional part in units of 1°/256 coded in binary.
    uint8_t m_monitorTempHoldlo[2];             //Lo Alarm Threshold for 1st Internal Temperature Monitor for Tx. Same 2 Byte format as 128-129
    uint8_t m_monitorTempHoldMsb[2];            //Hi Alarm Threshold for 2nd Internal Temperature Monitor for Tx. Same 2 Byte format
    uint8_t m_monitorTempHoldLsb[2];             //Lo Alarm Threshold for 2nd Internal Temperature Monitor for Tx. Same 2 Byte format
    uint8_t m_reserved0[8];                      //Reserved - Alarm Thresholds for Module Monitors
    uint8_t m_v3r3ThresholdMsb[2];              //Hi Alarm Threshold for Internal Vcc3.3 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_v3r3ThresholdLsb[2];              //Lo Alarm Threshold for Internal Vcc3.3 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_reserved1[4];                      //Hi Alarm Threshold for Internal Vcc12 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_reserved3[16];                     //Reserved - Alarm Thresholds for Module Monitors
    uint8_t m_biasCurMsb[2];                    //High Alarm Threshold on Tx Bias current: in 2 μA units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_biasCurLsb[2];                    //High Alarm Threshold on Transmitted Optical Power in 0.1 μW units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_powerThresholdMsb[2];             //High Alarm Threshold on Transmitted Optical Power in 0.1 μW units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_powerThresholdLsb[2];             //Reserved - Alarm Thresholds for Channel Monitors
    uint8_t m_reserved4[4];                      //Reserved - Alarm Thresholds for Channel Monitors
    uint8_t m_checkSum[2];                      //Checksum: Low order 16 bits of the sum of all pairs of bytes from 128 through 175 inclusive, as unsigned integers.
    uint8_t m_biasCurMonitor[24];               //Per-channel Tx Bias current: Monitor. 2B per channel, each measured in 2 μA units coded as 16 bit unsigned integer, Low byte within each byte pair is MSB. Tolerance is ± 0.50 mA.
    uint8_t m_opticalPwdMonitor[24];            //Per-channel Tx Light Output Monitor in 0.1μW units coded as 16 bit unsigned integer, Low byte within each pair is MSB. Tolerance is +/- 3 dB
    uint8_t m_VendorSpecific[26];               //Vendor Specific Tx Functions
};


struct __attribute__ ((__packed__)) upperMemoryRx1
{
    uint8_t m_tempThresholdMsb;                 //Hi Alarm Threshold for 1st Internal Temperature Monitor for Tx MSB: Integer part coded in signed 2’s complement. Tolerance is ± 3°C.
    uint8_t m_tempThresholdLsb;                 //Hi Alarm Threshold for 1st Internal Temperature Monitor for Tx LSB: Fractional part in units of 1°/256 coded in binary.
    uint8_t m_monitorTempHoldlo[2];             //Lo Alarm Threshold for 1st Internal Temperature Monitor for Tx. Same 2 Byte format as 128-129
    uint8_t m_monitorTempHoldMsb[2];            //Hi Alarm Threshold for 2nd Internal Temperature Monitor for Tx. Same 2 Byte format
    uint8_t m_monitorTempHoldLsb[2];             //Lo Alarm Threshold for 2nd Internal Temperature Monitor for Tx. Same 2 Byte format
    uint8_t m_reserved0[8];                      //Reserved - Alarm Thresholds for Module Monitors
    uint8_t m_v3r3ThresholdMsb[2];              //Hi Alarm Threshold for Internal Vcc3.3 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_v3r3ThresholdLsb[2];              //Lo Alarm Threshold for Internal Vcc3.3 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_reserved1[4];                      //Hi Alarm Threshold for Internal Vcc12 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_reserved2[16];                     //Lo Alarm Threshold for Internal Vcc12 Monitor for Tx: Voltage in 100 μV units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_reserved3[8];                     //Reserved - Alarm Thresholds for Module Monitors
    uint8_t m_powerThresholdMsb[2];             //High Alarm Threshold on Transmitted Optical Power in 0.1 μW units coded as 16 bit unsigned integer, Low byte is MSB.
    uint8_t m_powerThresholdLsb[2];             //Reserved - Alarm Thresholds for Channel Monitors
    uint8_t m_checkSum[2];                      //Checksum: Low order 16 bits of the sum of all pairs of bytes from 128 through 175 inclusive, as unsigned integers.
    uint8_t m_biasCurMonitor[24];               //Per-channel Tx Bias current: Monitor. 2B per channel, each measured in 2 μA units coded as 16 bit unsigned integer, Low byte within each byte pair is MSB. Tolerance is ± 0.50 mA.
    uint8_t m_opticalPwdMonitor[24];            //Per-channel Tx Light Output Monitor in 0.1μW units coded as 16 bit unsigned integer, Low byte within each pair is MSB. Tolerance is +/- 3 dB
    uint8_t m_VendorSpecific[26];               //Vendor Specific Tx Functions
};

#endif // !__QSFP_4x_h_